import { ref } from 'vue'
import axios from 'axios';

export default function () {
    const imgList = ref(['https://images.dog.ceo/breeds/pembroke/n02113023_15576.jpg'])

    async function addImg() {
    const result = await axios.get('https://dog.ceo/api/breed/pembroke/images/random')
    console.log(result.data)
    const img = result.data.message
    imgList.value.push(img)
    }

    return {
        imgList,
        addImg
    }
}
